<?php echo $header; ?>     

<!-- Content -->
<div id="main" class="p13t">
    <!-- Left column -->
    <?php echo $column_left; ?>
    
    <div id="col2" class="w709">
        <div class="box_tt">
            <?php if(1==0){ ?>                    
            <h4 class="float_left p5t">Produkter</h4>
            <?php } ?>        
            <h4 class="float_left p5t">           
                <?php foreach ($breadcrumbs as $breadcrumb) { ?>                      
                    <span class="breadcrumb_sep"><?php echo $breadcrumb['separator']; ?></span><span class="breadcrumb_text"><?php echo $breadcrumb['text']; ?></span>                    
                <?php } ?>
            </h4>
            <!-- span class="float_right"><a href="<?php echo $back; ?>"><img src="catalog/view/theme/<?php echo $template; ?>/images/bt_tibage.png"/></a></span --> 
        </div>
        
        <div class="box_content_underpage">
            <div class="box_content_underpage1 min_heght">
                <div class="p15t p15l p20r min_heght2">
                    <div class="tt_top_pro2">                          
                        <div class="boder_white">
                            <div class="float_left p14l p10t">
                                 <?php if(1==0){ ?>
                                 <h4>Product - id:&nbsp;<?php echo $product_number; ?></h4>
                                 <span class="style3"><?php echo $short_title; ?></span><br />
                                 <?php } ?>
                                 <span class="product_title">Vare-nummer:&nbsp;<?php echo $sku; ?></span><br />
                                 <span class="product_title"><?php echo $short_title; ?></span><br />
                                 <?php if(!empty($discounts) || isset($discount)){ ?> 
                                    <span class="style3">Før:<span id="product_price_discount" class="style2_discount">&nbsp;<?php echo $price; ?></span></span>&nbsp;&nbsp;&nbsp;&nbsp; 
                                    <span class="style9">Nu:<span id="product_price" class="style9_discount">&nbsp;<?php echo $discounts[0]['price']; ?></span></span>
                                <?php }else{ ?>
                                    <span class="style3">Pris:<span class="style2">&nbsp;<?php echo $price; ?></span></span> 
                                <?php } ?>
                             </div>   
                             <p id="zoom_img_list"class="float_right p25t p5r zom_img_thumb">    
                                <?php if ($images) { ?>
                                    <?php foreach ($images as $image) { ?>
                                        <a href="<?php echo $image['full']; ?>" title="<?php echo $heading_title; ?>"><img src="<?php echo $image['thumb']; ?>" /></a>
                                    <?php } ?>                                      
                                <?php } ?>                                                            
                                <br class="cb" />
                             </p>
                             <p class="cb"></p>                             
                         </div>
                    </div>                      
                   
                    <!-- product --> 
                    <div id="product_content" class="p2t p15b">                          
                        <!-- zoom view of product images -->  
                        <div id="product_zoom_view" class="box_all_img_pro_show" style="display:block;">
                            <script src="catalog/view/theme/<?php echo $template; ?>/js/swfobject_modified.js" type="text/javascript"></script>
                            <script src="catalog/view/theme/<?php echo $template; ?>/js/controlmousewheel.js" type="text/javascript"></script>
                            <script src="catalog/view/theme/<?php echo $template; ?>/js/ac_runactivecontent.js" language="javascript"></script>
                             
                            <script type="text/javascript">
                            // <![CDATA[          
                                swfobject.registerObject("FlashID"); 
                            // ]]>    
                            </script>

                            <script type="text/javascript">
                            // <![CDATA[          
                                var currentImage = "<?php echo $full; ?>"; 
                                function switchImage(){
                                    changeImage(currentImage);  
                                }
                                
                                function getFlashMovie(movieName) {
                                    var isIE = navigator.appName.indexOf("Microsoft") != -1;
                                    return (isIE) ? window[movieName] : document[movieName];
                                 }

                                function changeImage(src){
                                    getFlashMovie('flashZoomer').newImage(src);
                                }

                                jQuery(document).ready(function(){
                                    jQuery('#zoom_img_list a').click(function(even){
                                        even.preventDefault();
                                        
                                        jQuery('#zoom_img_list a').each(function(){
                                            if(jQuery(this).hasClass('current')){
                                                jQuery(this).removeClass('current')
                                            }
                                            
                                        });
                                        jQuery(this).addClass('current');                                        
                                        currentImage = jQuery(this).attr('href');;
                                        changeImage(currentImage);
                                    });
                                }); 
                            // ]]>    
                            </script>     
                                                  
                            <script language="javascript">
                            // <![CDATA[    
                                if (AC_FL_RunContent == 0) {
                                    alert("This page requires AC_RunActiveContent.js.");
                                } else {
                                    AC_FL_RunContent(
                                        "codebase", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0",
                                        "width", "673",
                                        "height", "336",
                                        "src", "flashZoomer",
                                        "quality", "high",
                                        "pluginspage", "http://www.macromedia.com/go/getflashplayer",
                                        "align", "middle",
                                        "play", "true",
                                        "loop", "true",
                                        "scale", "noScale",
                                        "wmode", "window",
                                        "flashVars", "var2=<?php echo urlencode($normal_view); ?>&var1=<?php echo $full; ?>",
                                        "devicefont", "false",
                                        "id", "flashZoomer",
                                        "bgcolor", "#FFFFFF",
                                        "name", "flashZoomer",
                                        "menu", "true",
                                        "allowFullScreen", "false",
                                        "allowScriptAccess","sameDomain",
                                        "movie", "catalog/view/theme/<?php echo $template; ?>/swf/flashZoomer",
                                        "salign", "lt"
                                    ); //end AC code
                                }
                            // ]]>       
                            </script>       
                            <noscript>
                                <object id="flashZoomer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="673" height="336" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
                                    <param name="movie" value="catalog/view/theme/<?php echo $template; ?>/swf/flashZoomer.swf" />
                                    <param name="quality" value="high" />
                                    <param name="bgcolor" value="#FFFFFF" />
                                    <param name="allowScriptAccess" value="sameDomain" /> 
                                    <param name="flashVars" value="var2=<?php echo urlencode($normal_view); ?>&var1=<?php echo $full; ?>" />
                                    <param name="scaleMode" value="noScale" />
                                    <embed src="swf/flashZoomer.swf" quality="high" bgcolor="#FFFFFF"
                                        width="673" height="336" name="flashZoomer" align="middle"
                                        play="true"
                                        flashVars = "var2=<?php echo urlencode($normal_view); ?>&var1=<?php echo $full; ?>"
                                        loop="false"
                                        quality="high"
                                        scaleMode="noScale"
                                        allowScriptAccess="sameDomain"
                                        type="application/x-shockwave-flash"
                                        pluginspage="http://www.adobe.com/go/getflashplayer">
                                    </embed>
                                </object>
                            </noscript>
                        </div>
        
                        <!-- bottom block  of product information -->
                        <div class="box_all_tab">
                            <div id="tabs_header" class="tab_pro">
                                <ul>
                                    <li id="tabs_desc_title"><a href="#tab_desc"><span>Om Produktet</span></a></li>
                                    <?php if(($size_guide != '') && ($size_guide != 'none')){ ?> 
                                        <li id="tabs_size_title"><a href="#tab_size"><span>Størrelse og fit</span></a></li>
                                    <?php } ?>
                                     <?php if(!empty($products)){ ?>
                                        <li id="tabs_related_title"><a href="#tab_related_product"><span>Relaterde varer</span></a></li>
                                    <?php } ?>
                                </ul>
                                <p class="cb"></p>
                            </div>
                            
                            <!-- Tab description -->                              
                            <div id="tabs_description" class="p10t tabs_content">
                                <?php echo $description;  //$manufacturer_desc; ?>                                          
                            </div>
                            <!-- Tab size -->
                            <?php if(($size_guide != '') && ($size_guide != 'none')){ ?> 
                                <?php echo $size_guide_data; ?>    
                            <?php } ?>                                 
                            <!-- Tab related product -->
                            <?php if(!empty($products)){ ?>
                                <div id="tabs_related_product" class="p20t" style="display: none;">                   
                                     <div class="tab_related_data">
                                        <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                            <tbody>
                                                <?php $count = count($products); $i = 0; ?>
                                                <?php foreach($products as $related_item){ ?>
                                                    <?php $i++; ?>
                                                    <?php $class = $i == $count ? 'p7' : 'border_bottom p7'; ?>
                                                    <tr>
                                                       <td width="13%" class="<?php echo $class; ?>"><img height="75" width="61" src="<?php echo $related_item['image']; ?>"></td>
                                                       <td width="38%" class="<?php echo $class; ?>"><?php echo $related_item['name']; ?><br>Pris: <span class="style2"><?php echo $related_item['price']; ?></span></td>
                                                       <td width="49%" class="<?php echo $class; ?>"><a href="<?php echo $related_item['href']; ?>"><img src="catalog/view/theme/<?php echo $template; ?>/images/icon_shopping.png"></a></td>
                                                    </tr>
                                                <?php } ?>                                           
                                            </tbody>
                                        </table>
                                    </div>                                
                                </div> 
                            <?php } ?>                                 
                        </div>
                    </div>                         
                </div> 
                <div id="bottom_nav" class="bt_tab">
                    <p class="p12l float_left p10t"><a href="<?php echo $back; ?>"><img src="catalog/view/theme/<?php echo $template; ?>/images/bt_tibage.png"/></a></p>
                    <p class=" p15r float_right p10t"><a href="<?php echo $checkout; ?>"><img src="catalog/view/theme/<?php echo $template; ?>/images/bt_indkobskurven2.png"/></a></p>
                    <p class="cb"></p>
                </div>
                </div>                
            </div>
        
            <div class="box_bottom">
                <div class="all_page_bt"></div>
            </div>
        </div>
        <p class="cb"></p>
    </div>
</div>
<!-- End content -->

<!-- Footer -->
<?php echo $footer; ?>

<!-- Product effect -->       
<script type="text/javascript"><!--  
    jQuery(document).ready(function(){
        jQuery('#tabs_desc_title a').trigger('click');   
        //jQuery('#product_normal_view #size_view').trigger('click');

        jQuery('#cloud_zoom').click(function(even){
            even.preventDefault();
        }); 
    });
    
    // Description and Size
    jQuery('#tabs_desc_title a').click(function(event){
        event.preventDefault();             
        
        if(jQuery('#tabs_size').length > 0){ 
            if(jQuery('#tabs_size_title').hasClass('current'))
                jQuery('#tabs_size_title').removeClass('current');
            jQuery('#tabs_size').hide();
        }
        
        if(jQuery('#tabs_related_product').length > 0){
            if(jQuery('#tabs_related_title').hasClass('current'))
                jQuery('#tabs_related_title').removeClass('current');
            jQuery('#tabs_related_product').hide();
        }
        
        jQuery('#tabs_desc_title').addClass('current');             
        jQuery('#tabs_description').show();                  
    });                
    
    jQuery('#tabs_size_title a').bind('click', tabSizeClick);  
    jQuery('#ref_tab_size').bind('click', tabSizeClick);  
    
    // Zoom and normal view
    jQuery('#size_view').click(function(event){
        event.preventDefault();            
    });   
        
    function tabSizeClick(event){
        event.preventDefault();             
        
        if(jQuery('#tabs_size').length <= 0){
            return;
        }
        
        if(jQuery('#tabs_desc_title').hasClass('current'))
            jQuery('#tabs_desc_title').removeClass('current');
        jQuery('#tabs_description').hide();
        
        if(jQuery('#tabs_related_product').length > 0){
            if(jQuery('#tabs_related_title').hasClass('current'))
                jQuery('#tabs_related_title').removeClass('current');
            jQuery('#tabs_related_product').hide();
        }
        
        jQuery('#tabs_size_title').addClass('current');             
        jQuery('#tabs_size').show();                  
    }
    
    // Related products
    jQuery('#tabs_related_title a').click(function(event){
        event.preventDefault();             
        
        if(jQuery('#tabs_size').length > 0){
            if(jQuery('#tabs_size_title').hasClass('current'))
                jQuery('#tabs_size_title').removeClass('current');
            jQuery('#tabs_size').hide();
        }
        
        if(jQuery('#tabs_desc_title').hasClass('current'))
            jQuery('#tabs_desc_title').removeClass('current');
        jQuery('#tabs_description').hide();
        
        jQuery('#tabs_related_title').addClass('current');           
        jQuery('#tabs_related_product').show();                       
    });   
//-->
</script>
